/*! http://mths.be/placeholder v2.0.7 by @mathias */ function VideoBg(e){Object.defineProperty(this,"self",{get:function(){return e},set:function(e){this.parent=e},enumerable:!0,configurable:!0}),Object.defineProperty(this,"parent",{get:function(){return e.hasClass("body-iframe")?$(window):e.parent()},set:function(e){this.parent=e.parent()},enumerable:!0,configurable:!0}),this.getVideoRatio=function(){return 1.78},this.resize=function(){var e=this.parent.width(),t=this.parent.height();t/e>.5625?(this.self.height(t),this.self.width(t*this.getVideoRatio())):(this.self.width(e*this.getVideoRatio()),this.self.height(e/this.getVideoRatio())),this.self.css({left:"50%",top:"50%",transform:"translate(-50%, -50%)"})}}function addParamsToUrl(e,t){for(var a in t)t.hasOwnProperty(a)&&(e+=(e.split("?")[1]?"&":"?")+encodeURIComponent(a)+"="+encodeURIComponent(t[a]));return e}function createCookieForCreatio(){if(null!==document.querySelector('[data-integration="creatio"]')){let e=document.referrer;document.cookie="lp_referer_for_lead="+e}}function removeParamFromUrl(e,t){var a=e.split("?");if(!(a.length>=2))return e;for(var r=encodeURIComponent(t)+"=",i=a[1].split(/[&;]/g),n=i.length;n-- >0;)-1!==i[n].lastIndexOf(r,0)&&i.splice(n,1);return a[0]+(i.length>0?"?"+i.join("&"):"")}function getCookie(e){var t=document.cookie.match("(^|;) ?"+e+"=([^;]*)(;|$)");return t?t[2]:null}function saveUrlLeadIdToFormInput(){var e=getCookie("lndingActnAftrSbsLd");e&&Object.values(document.querySelectorAll('form input[name="_lead_uuid"]')).forEach(function(t){t.value=e})}function checkUrlForActionAfterSubmission(){var e=getUrlVars();for(var t in e)if(e.hasOwnProperty("lndingActnAftrSbsLd")){var a=new Date,r=removeParamFromUrl(document.location.href,"lndingActnAftrSbsLd");a.setMinutes(a.getMinutes()+30),document.cookie="lndingActnAftrSbsLd="+e[t]+";expires="+a.toUTCString()+";path="+window.location.pathname,window.history.pushState({path:r},"",r)}}function getUrlVars(){var e={};return(document.URL?document.URL:window.location.href).replace(/[?&]+([^=&]+)=([^&]*)/gi,function(t,a,r){e[a]=r}),e}!function(e,t,a){function r(e,t){var r=this,i=a(r);if(r.value==i.attr("placeholder")&&i.hasClass("placeholder")){if(i.data("placeholder-password")){if(i=i.hide().next().show().attr("id",i.removeAttr("id").data("placeholder-id")),!0===e)return i[0].value=t;i.focus()}else r.value="",i.removeClass("placeholder"),r==n()&&r.select()}}function i(){var e,t,i,n,o=a(this),l=this.id;if(""==this.value){if("password"==this.type){if(!o.data("placeholder-textinput")){try{n=o.clone().attr({type:"text"})}catch(s){n=a("").attr(a.extend((e=this,t={},i=/^jQuery\d+$/,a.each(e.attributes,function(e,a){a.specified&&!i.test(a.name)&&(t[a.name]=a.value)}),t),{type:"text"}))}n.removeAttr("name").data({"placeholder-password":o,"placeholder-id":l}).bind("focus.placeholder",r),o.data({"placeholder-textinput":n,"placeholder-id":l}).before(n)}o=o.removeAttr("id").hide().prev().attr("id",l).show()}o.addClass("placeholder"),o[0].value=o.attr("placeholder")}else o.removeClass("placeholder")}function n(){try{return t.activeElement}catch(e){}}var o,l,s="placeholder"in t.createElement("input"),c="placeholder"in t.createElement("textarea"),u=a.fn,p=a.valHooks,d=a.propHooks;s&&c?(l=u.placeholder=function(){return this}).input=l.textarea=!0:((l=u.placeholder=function(){return this.filter((s?"textarea":":input")+"[placeholder]").not(".placeholder").bind({"focus.placeholder":r,"blur.placeholder":i}).data("placeholder-enabled",!0).trigger("blur.placeholder"),this}).input=s,l.textarea=c,o={get:function(e){var t=a(e),r=t.data("placeholder-password");return r?r[0].value:t.data("placeholder-enabled")&&t.hasClass("placeholder")?"":e.value},set:function(e,t){var o=a(e),l=o.data("placeholder-password");return l?l[0].value=t:o.data("placeholder-enabled")?(""==t?(e.value=t,e!=n()&&i.call(e)):o.hasClass("placeholder")&&r.call(e,!0,t)||(e.value=t),o):e.value=t}},s||(p.input=o,d.value=o),c||(p.textarea=o,d.value=o),a(function(){a(t).delegate("form","submit.placeholder",function(){var e=a(".placeholder",this).each(r);setTimeout(function(){e.each(i)},10)})}),a(e).bind("beforeunload.placeholder",function(){a(".placeholder").each(function(){this.value=""})}))}(this,document,jQuery),$(function(){$("input, textarea").placeholder()}),Array.prototype.contains||(Array.prototype.contains=function(e){for(var t=this.length;t--;)if(this.hasOwnProperty(t)&&this[t]==e)return!0;return!1}),createCookieForCreatio(),checkUrlForActionAfterSubmission(),saveUrlLeadIdToFormInput(),$(function(){var e=["utm_source","utm_campaign","utm_medium","utm_term","utm_content"],t=getUrlVars(),a={};$.each(t,function(t,r){e.contains(t)&&(a[t]=r)}),$("form").each(function(){$(this).attr("action",function(e,t){return addParamsToUrl(t,a)})})}),jQuery.fn.preventDoubleSubmission=function(){return $(this).on("submit.prevent",function(e){var t=$(this);!0===t.data("submitted")?(e.preventDefault(),e.stopImmediatePropagation()):t.data("submitted",!0)}),this};var validateCallbacks=[];function registerValidateCallback(e){validateCallbacks.push(e)}!function(){"use strict";function e(e){e.css("transform","translate3d(0,0,0)")}function t(e){e.css("transform","")}function a(e){t(e),e.hide(300),"undefined"!=typeof youtubeVideos&&youtubeVideos.forEach(function(e){0!==$("#"+e.hash).closest(".landingi-popup").length&&youtubePlayers[e.hash].pauseVideo()})}$('[subtype="popup"]').on("click",function(t){t.preventDefault();var a=$(this).attr("href"),r=$(a);if(r.show(300,e.bind(null,r)),$('[class*="-iframe-enabled-"]:not(.iframe-mockup):visible').each(function(e,t){new VideoBg($(t)).resize(),768>$(window).width()&&($(t).attr("src",""),setTimeout(function(){$(t).attr("src","")},200))}),"undefined"!=typeof youtubeVideos&&youtubeVideos[a.replace("#","")]){var i=youtubeVideos[a.replace("#","")];1===i.autoplay&&0!==$("#"+i.hash).closest(".landingi-popup").length&&youtubePlayers[i.hash].playVideo()}}),$(".landingi-popup-body").on("click","*",function(e){e.stopPropagation()}),$(".landingi-popup").on("click",function(){a($(this))}),$(".widget-popupcloser").on("click",function(){a($(this).parents(".landingi-popup").first())}),$(document).on("keydown",function(e){var a;a=e,("Escape"===a.key||27===a.keyCode||27===a.which)&&$(".landingi-popup").each(function(e,a){var r=$(a);t(r),r.hide(300)})}),$("form").preventDoubleSubmission(),$("form.widget-form").on("submit.validate",function e(t){t.preventDefault();var a=$("body"),r=$(this),i=r.find(".widget-input-button"),n=i.find(".widget-overlay"),o=r.parents(".landingi-popup").first(),l=$(".form-error-tooltip"),s={"_landing-hash":r.attr("data-hash")},c="https://api.landingi.com/validate";window.location.href.indexOf("landingi.it")>0&&(c="https://api.landingi.it/validate"),o.length&&(s._popup=o.attr("id").replace("#","")),n.css("color",i.css("color")),n.append(''),i.css("color","transparent"),r.ajaxSubmit({url:c,data:s,method:"POST",processData:!1,contentType:!1,error:function(e,t,o){if(r.data("submitted",!1),l.remove(),i.css("color",""),n.empty(),400===e.status){var s=JSON.parse(e.responseText).html;validateCallbacks.forEach(function(e){var t=e(s);t&&(s=t)}),a.append(s),window.positionValidationTooltips(),window.scrollToFirstTooltip()}else alert(o||e.responseText)},success:function(){window.submitGAformTracking?(window.submitGAformTracking(),setTimeout(function(){r.data("submitted",!1),r.off(".validate"),r.submit(),n.remove(),i.removeAttr("style")},300)):(r.data("submitted",!1),r.off(".validate"),r.submit())}})})}(),$('[class*="-iframe-enabled-"]:not(.iframe-mockup):visible').each(function(e,t){new VideoBg($(t)).resize(),768>$(window).width()&&($(t).attr("src",""),setTimeout(function(){$(t).attr("src","")},200))}),$(document).ready(function(){var e=$("#flash");e.length>0&&alert(e.html()),$("#branding").css({position:"static"})}),function(e){var t=!1;if("function"==typeof define&&define.amd&&(define(e),t=!0),"object"==typeof exports&&(module.exports=e(),t=!0),!t){var a=window.Cookies,r=window.Cookies=e();r.noConflict=function(){return window.Cookies=a,r}}}(function(){function e(){for(var e=0,t={};e1){if("number"==typeof(n=e({path:"/"},r.defaults,n)).expires){var o,l=new Date;l.setMilliseconds(l.getMilliseconds()+864e5*n.expires),n.expires=l}try{o=JSON.stringify(i),/^[\{\[]/.test(o)&&(i=o)}catch(s){}return i=a.write?a.write(i,t):encodeURIComponent(String(i)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=(t=(t=encodeURIComponent(String(t))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape),document.cookie=[t,"=",i,n.expires?"; expires="+n.expires.toUTCString():"",n.path?"; path="+n.path:"",n.domain?"; domain="+n.domain:"",n.secure?"; secure":""].join("")}t||(o={});for(var c=document.cookie?document.cookie.split("; "):[],u=/(%[0-9A-Z]{2})+/g,p=0;p